/*
* @Author: Marte
* @Date:   2016-10-24 11:41:54
* @Last Modified by:   Marte
* @Last Modified time: 2016-10-24 11:57:33
*/

'use strict';

var sequelizeService = require('../utils/sequelizeService');

sequelizeService.sequelize
  .sync()
  .then(function(){
        var Type = sequelizeService.models.Type;

        var arrType=[{
            typeName:'护照或港澳台通行证'
        },{
            typeName:'港澳台居民出入境证件'
        },{
            typeName:'驻澳门劳工证件'
        },{
            typeName:'外国人签证'
        },{
            typeName:'居民身份证'
        },{
            typeName:'机动车驾驶证'
        },{
            typeName:'居住证'
        },{
            typeName:'保安员证'
        },{
            typeName:'社保保障证'
        }];

        Type
      .bulkCreate(arrType,{individualHooks:true})
      .then(function() {
        console.log('新增 %d 条记录', arrType.length);
      })
      .error(function(err) {
        console.log(err);
      });
  });